package com.wwwarehouse.usercenter.bean.authoritydistribute;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 分配权限结果
 * Created by ShineF on 2017/9/26 0026.
 */

public class DistributeResultBean implements Parcelable {


    /**
     * processId : 12095700000004032
     * detail : {"selectedUserCount":2,"authorityCount":2}
     * description : 部分失败
     * status : 2
     */

    private long processId;
    private DetailBean detail;
    private String description;
    private int status;

    public long getProcessId() {
        return processId;
    }

    public void setProcessId(long processId) {
        this.processId = processId;
    }

    public DetailBean getDetail() {
        return detail;
    }

    public void setDetail(DetailBean detail) {
        this.detail = detail;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public static class DetailBean implements Parcelable {
        /**
         * selectedUserCount : 2
         * authorityCount : 2
         */

        private int selectedUserCount;
        private int authorityCount;

        public int getSelectedUserCount() {
            return selectedUserCount;
        }

        public void setSelectedUserCount(int selectedUserCount) {
            this.selectedUserCount = selectedUserCount;
        }

        public int getAuthorityCount() {
            return authorityCount;
        }

        public void setAuthorityCount(int authorityCount) {
            this.authorityCount = authorityCount;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.selectedUserCount);
            dest.writeInt(this.authorityCount);
        }

        public DetailBean() {
        }

        protected DetailBean(Parcel in) {
            this.selectedUserCount = in.readInt();
            this.authorityCount = in.readInt();
        }

        public static final Creator<DetailBean> CREATOR = new Creator<DetailBean>() {
            @Override
            public DetailBean createFromParcel(Parcel source) {
                return new DetailBean(source);
            }

            @Override
            public DetailBean[] newArray(int size) {
                return new DetailBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.processId);
        dest.writeParcelable(this.detail, flags);
        dest.writeString(this.description);
        dest.writeInt(this.status);
    }

    public DistributeResultBean() {
    }

    protected DistributeResultBean(Parcel in) {
        this.processId = in.readLong();
        this.detail = in.readParcelable(DetailBean.class.getClassLoader());
        this.description = in.readString();
        this.status = in.readInt();
    }

    public static final Parcelable.Creator<DistributeResultBean> CREATOR = new Parcelable.Creator<DistributeResultBean>() {
        @Override
        public DistributeResultBean createFromParcel(Parcel source) {
            return new DistributeResultBean(source);
        }

        @Override
        public DistributeResultBean[] newArray(int size) {
            return new DistributeResultBean[size];
        }
    };
}
